package com.sailorj.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @program: springLab
 * @description: 视图跳转
 * @author: huangshengjun
 * @create: 2020-04-03 00:24
 **/
@Controller
@RequestMapping("/view")
public class ViewController {


    @RequestMapping("/toLogin")
    public ModelAndView login() {
        System.out.println("login视图跳转。。。");
        return new ModelAndView("login");
    }

//    @RequestMapping("/toRegister")
//    public ModelAndView register() {
//        System.out.println("register视图跳转。。。");
//        return new ModelAndView("register");
//    }


    @RequestMapping("/toThymeleaf")
    public ModelAndView testThymeleaf() {
        System.out.println("testThymeleaf。。。");
        return new ModelAndView("testThymeleaf");
    }
    @RequestMapping("/toUserAdd")
    public ModelAndView toUserAdd() {
        System.out.println("user_add视图跳转。。。");
        return new ModelAndView("user/user_add");
    }
    @RequestMapping("/toUserUpdate")
    public ModelAndView toUserUpdate() {
        System.out.println("user_update视图跳转。。。");
        return new ModelAndView("user/user_update");
    }
}
